<?php

    require_once 'database_engine/mysql_engine.php';
    require_once 'components/page.php';
    require_once 'phpgen_settings.php';
    require_once 'authorization.php';

    function GetConnectionOptions()
    {
        $result = GetGlobalConnectionOptions();
        $result['client_encoding'] = 'utf8';
        GetApplication()->GetUserAuthorizationStrategy()->ApplyIdentityToConnectionOptions($result);
        return $result;
    }

    
    
    ?><?php
    
    ?><?php
    
    class giocatoriDetailView0Page extends DetailPage
    {
        protected function DoBeforeCreate()
        {
            $this->dataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`giocatori`');
            $field = new IntegerField('IDG', null, null, true);
            $this->dataset->AddField($field, true);
            $field = new StringField('ALIAS');
            $this->dataset->AddField($field, false);
            $field = new StringField('NOME_COMPLETO');
            $this->dataset->AddField($field, false);
        }
    
        protected function AddFieldColumns($grid)
        {
            //
            // View column for IDG field
            //
            $column = new TextViewColumn('IDG', 'IDG', $this->dataset);
            $column->SetOrderable(false);
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for ALIAS field
            //
            $column = new TextViewColumn('ALIAS', 'ALIAS', $this->dataset);
            $column->SetOrderable(false);
            
            /* <inline edit column> */
            //
            // Edit column for ALIAS field
            //
            $editor = new TextEdit('alias_edit');
            $editor->SetSize(20);
            $editColumn = new CustomEditColumn('ALIAS', 'ALIAS', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for ALIAS field
            //
            $editor = new TextEdit('alias_edit');
            $editor->SetSize(20);
            $editColumn = new CustomEditColumn('ALIAS', 'ALIAS', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for NOME_COMPLETO field
            //
            $column = new TextViewColumn('NOME_COMPLETO', 'NOME COMPLETO', $this->dataset);
            $column->SetOrderable(false);
            
            /* <inline edit column> */
            //
            // Edit column for NOME_COMPLETO field
            //
            $editor = new TextEdit('nome_completo_edit');
            $editor->SetSize(40);
            $editColumn = new CustomEditColumn('NOME COMPLETO', 'NOME_COMPLETO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for NOME_COMPLETO field
            //
            $editor = new TextEdit('nome_completo_edit');
            $editor->SetSize(40);
            $editColumn = new CustomEditColumn('NOME COMPLETO', 'NOME_COMPLETO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
        }
        
        function GetCustomClientScript()
        {
            return ;
        }
        
        function GetOnPageLoadedClientScript()
        {
            return ;
        }
    
        public function GetPageDirection()
        {
            return null;
        }
    
        protected function ApplyCommonColumnEditProperties($column)
        {
            $column->SetShowSetToNullCheckBox(true);
        }
    
        protected function CreateGrid()
        {
            $result = new Grid($this, $this->dataset, 'giocatoriDetailViewGrid0');
            $result->SetAllowDeleteSelected(false);
            $result->SetUseFixedHeader(false);
            
            $result->SetHighlightRowAtHover(false);
            $result->SetWidth('');
            $this->AddFieldColumns($result);
    
            return $result;
        }
    }
    
    
    
    ?><?php
    
    ?><?php
    
    class giocatoriDetailEdit0Page extends DetailPageEdit
    {
        protected function DoBeforeCreate()
        {
            $this->dataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`giocatori`');
            $field = new IntegerField('IDG', null, null, true);
            $this->dataset->AddField($field, true);
            $field = new StringField('ALIAS');
            $this->dataset->AddField($field, false);
            $field = new StringField('NOME_COMPLETO');
            $this->dataset->AddField($field, false);
        }
    
        protected function CreatePageNavigator()
        {
            $result = new CompositePageNavigator($this);
            
            $partitionNavigator = new PageNavigator('pnav', $this, $this->dataset);
            $partitionNavigator->SetRowsPerPage(20);
            $result->AddPageNavigator($partitionNavigator);
            
            return $result;
        }
    
        public function GetPageList()
        {
            return null;
        }
    
        protected function CreateRssGenerator()
        {
            return null;
        }
    
        protected function CreateGridSearchControl($grid)
        {
            $grid->UseFilter = true;
            $grid->SearchControl = new SimpleSearch('giocatoriDetailEdit0ssearch', $this->dataset,
                array('IDG', 'ALIAS', 'NOME_COMPLETO'),
                array($this->RenderText('IDG'), $this->RenderText('ALIAS'), $this->RenderText('NOME COMPLETO')),
                array(
                    '=' => $this->GetLocalizerCaptions()->GetMessageString('equals'),
                    '<>' => $this->GetLocalizerCaptions()->GetMessageString('doesNotEquals'),
                    '<' => $this->GetLocalizerCaptions()->GetMessageString('isLessThan'),
                    '<=' => $this->GetLocalizerCaptions()->GetMessageString('isLessThanOrEqualsTo'),
                    '>' => $this->GetLocalizerCaptions()->GetMessageString('isGreaterThan'),
                    '>=' => $this->GetLocalizerCaptions()->GetMessageString('isGreaterThanOrEqualsTo'),
                    'ILIKE' => $this->GetLocalizerCaptions()->GetMessageString('Like'),
                    'STARTS' => $this->GetLocalizerCaptions()->GetMessageString('StartsWith'),
                    'ENDS' => $this->GetLocalizerCaptions()->GetMessageString('EndsWith'),
                    'CONTAINS' => $this->GetLocalizerCaptions()->GetMessageString('Contains')
                    ), $this->GetLocalizerCaptions(), $this, 'CONTAINS'
                );
        }
    
        protected function CreateGridAdvancedSearchControl($grid)
        {
            $this->AdvancedSearchControl = new AdvancedSearchControl('giocatoriDetailEdit0asearch', $this->dataset, $this->GetLocalizerCaptions());
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('IDG', $this->RenderText('IDG')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('ALIAS', $this->RenderText('ALIAS')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('NOME_COMPLETO', $this->RenderText('NOME COMPLETO')));
        }
    
        public function GetPageDirection()
        {
            return null;
        }
    
        protected function AddOperationsColumns($grid)
        {
            $actionsBandName = 'actions';
            $grid->AddBandToBegin($actionsBandName, $this->GetLocalizerCaptions()->GetMessageString('Actions'), true);
            if ($this->GetSecurityInfo()->HasViewGrant())
            {
                $column = $grid->AddViewColumn(new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('View'), OPERATION_VIEW, $this->dataset), $actionsBandName);
                $column->SetImagePath('images/view_action.png');
            }
            if ($this->GetSecurityInfo()->HasEditGrant())
            {
                $column = $grid->AddViewColumn(new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('Edit'), OPERATION_EDIT, $this->dataset), $actionsBandName);
                $column->SetImagePath('images/edit_action.png');
                $column->OnShow->AddListener('ShowEditButtonHandler', $this);
            }
            if ($this->GetSecurityInfo()->HasDeleteGrant())
            {
                $column = $grid->AddViewColumn(new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('Delete'), OPERATION_DELETE, $this->dataset), $actionsBandName);
                $column->SetImagePath('images/delete_action.png');
                $column->OnShow->AddListener('ShowDeleteButtonHandler', $this);
            }
            if ($this->GetSecurityInfo()->HasAddGrant())
            {
                $column = $grid->AddViewColumn(new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('Copy'), OPERATION_COPY, $this->dataset), $actionsBandName);
                $column->SetImagePath('images/copy_action.png');
            }
        }
    
        protected function AddFieldColumns($grid)
        {
            //
            // View column for IDG field
            //
            $column = new TextViewColumn('IDG', 'IDG', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for ALIAS field
            //
            $column = new TextViewColumn('ALIAS', 'ALIAS', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for ALIAS field
            //
            $editor = new TextEdit('alias_edit');
            $editor->SetSize(20);
            $editColumn = new CustomEditColumn('ALIAS', 'ALIAS', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for ALIAS field
            //
            $editor = new TextEdit('alias_edit');
            $editor->SetSize(20);
            $editColumn = new CustomEditColumn('ALIAS', 'ALIAS', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for NOME_COMPLETO field
            //
            $column = new TextViewColumn('NOME_COMPLETO', 'NOME COMPLETO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for NOME_COMPLETO field
            //
            $editor = new TextEdit('nome_completo_edit');
            $editor->SetSize(40);
            $editColumn = new CustomEditColumn('NOME COMPLETO', 'NOME_COMPLETO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for NOME_COMPLETO field
            //
            $editor = new TextEdit('nome_completo_edit');
            $editor->SetSize(40);
            $editColumn = new CustomEditColumn('NOME COMPLETO', 'NOME_COMPLETO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
        }
    
        protected function AddSingleRecordViewColumns($grid)
        {
            //
            // View column for IDG field
            //
            $column = new TextViewColumn('IDG', 'IDG', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ALIAS field
            //
            $column = new TextViewColumn('ALIAS', 'ALIAS', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for NOME_COMPLETO field
            //
            $column = new TextViewColumn('NOME_COMPLETO', 'NOME COMPLETO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
        }
    
        protected function AddEditColumns($grid)
        {
            //
            // Edit column for ALIAS field
            //
            $editor = new TextEdit('alias_edit');
            $editor->SetSize(20);
            $editColumn = new CustomEditColumn('ALIAS', 'ALIAS', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for NOME_COMPLETO field
            //
            $editor = new TextEdit('nome_completo_edit');
            $editor->SetSize(40);
            $editColumn = new CustomEditColumn('NOME COMPLETO', 'NOME_COMPLETO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
        }
    
        protected function AddInsertColumns($grid)
        {
            //
            // Edit column for ALIAS field
            //
            $editor = new TextEdit('alias_edit');
            $editor->SetSize(20);
            $editColumn = new CustomEditColumn('ALIAS', 'ALIAS', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for NOME_COMPLETO field
            //
            $editor = new TextEdit('nome_completo_edit');
            $editor->SetSize(40);
            $editColumn = new CustomEditColumn('NOME COMPLETO', 'NOME_COMPLETO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            if ($this->GetSecurityInfo()->HasAddGrant())
            {
                $grid->SetShowAddButton(true);
                $grid->SetShowInlineAddButton(true);
            }
            else
            {
                $grid->SetShowInlineAddButton(false);
                $grid->SetShowAddButton(false);
            }
        }
    
        protected function AddPrintColumns($grid)
        {
            //
            // View column for IDG field
            //
            $column = new TextViewColumn('IDG', 'IDG', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ALIAS field
            //
            $column = new TextViewColumn('ALIAS', 'ALIAS', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for NOME_COMPLETO field
            //
            $column = new TextViewColumn('NOME_COMPLETO', 'NOME COMPLETO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
        }
    
        protected function AddExportColumns($grid)
        {
            //
            // View column for IDG field
            //
            $column = new TextViewColumn('IDG', 'IDG', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ALIAS field
            //
            $column = new TextViewColumn('ALIAS', 'ALIAS', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for NOME_COMPLETO field
            //
            $column = new TextViewColumn('NOME_COMPLETO', 'NOME COMPLETO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
        }
    
        protected function ApplyCommonColumnEditProperties($column)
        {
            $column->SetShowSetToNullCheckBox(true);
    	$column->SetVariableContainer($this->GetColumnVariableContainer());
        }
    
        function GetCustomClientScript()
        {
            return ;
        }
        
        function GetOnPageLoadedClientScript()
        {
            return ;
        }
        public function ShowEditButtonHandler($show)
        {
            if ($this->GetRecordPermission() != null)
                $show = $this->GetRecordPermission()->HasEditGrant($this->GetDataset());
        }
        public function ShowDeleteButtonHandler($show)
        {
            if ($this->GetRecordPermission() != null)
                $show = $this->GetRecordPermission()->HasDeleteGrant($this->GetDataset());
        }
    
        protected function CreateGrid()
        {
            $result = new Grid($this, $this->dataset, 'giocatoriDetailEditGrid0');
            if ($this->GetSecurityInfo()->HasDeleteGrant())
                $result->SetAllowDeleteSelected(true);
            else
                $result->SetAllowDeleteSelected(false);
            ApplyCommonPageSettings($this, $result);
            $result->SetUseImagesForActions(true);
            $result->SetUseFixedHeader(false);
            
            $result->SetHighlightRowAtHover(false);
            $result->SetWidth('');
            $this->CreateGridSearchControl($result);
            $this->CreateGridAdvancedSearchControl($result);
            $this->AddOperationsColumns($result);
            $this->AddFieldColumns($result);
            $this->AddSingleRecordViewColumns($result);
            $this->AddEditColumns($result);
            $this->AddInsertColumns($result);
            $this->AddPrintColumns($result);
            $this->AddExportColumns($result);
    
            $this->SetShowPageList(true);
            $this->SetExportToExcelAvailable(true);
            $this->SetExportToWordAvailable(true);
            $this->SetExportToXmlAvailable(true);
            $this->SetExportToCsvAvailable(true);
            $this->SetExportToPdfAvailable(true);
            $this->SetPrinterFriendlyAvailable(true);
            $this->SetSimpleSearchAvailable(true);
            $this->SetAdvancedSearchAvailable(true);
            $this->SetVisualEffectsEnabled(true);
            $this->SetShowTopPageNavigator(true);
            $this->SetShowBottomPageNavigator(true);
    
            //
            // Http Handlers
            //
    
            return $result;
        }
        
        protected function OpenAdvancedSearchByDefault()
        {
            return false;
        }
    
        protected function DoGetGridHeader()
        {
            return '';
        }    
    }
    
    
    
    ?><?php
    
    ?><?php
    
    class type_lookupDetailView1Page extends DetailPage
    {
        protected function DoBeforeCreate()
        {
            $this->dataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`type_lookup`');
            $field = new StringField('nome');
            $this->dataset->AddField($field, true);
        }
    
        protected function AddFieldColumns($grid)
        {
            //
            // View column for nome field
            //
            $column = new TextViewColumn('nome', 'Nome', $this->dataset);
            $column->SetOrderable(false);
            
            /* <inline edit column> */
            //
            // Edit column for nome field
            //
            $editor = new TextEdit('nome_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('Nome', 'nome', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'Nome'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for nome field
            //
            $editor = new TextEdit('nome_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('Nome', 'nome', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'Nome'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
        }
        
        function GetCustomClientScript()
        {
            return ;
        }
        
        function GetOnPageLoadedClientScript()
        {
            return ;
        }
    
        public function GetPageDirection()
        {
            return null;
        }
    
        protected function ApplyCommonColumnEditProperties($column)
        {
            $column->SetShowSetToNullCheckBox(true);
        }
    
        protected function CreateGrid()
        {
            $result = new Grid($this, $this->dataset, 'type_lookupDetailViewGrid1');
            $result->SetAllowDeleteSelected(false);
            $result->SetUseFixedHeader(false);
            
            $result->SetHighlightRowAtHover(false);
            $result->SetWidth('');
            $this->AddFieldColumns($result);
    
            return $result;
        }
    }
    
    
    
    ?><?php
    
    ?><?php
    
    class type_lookupDetailEdit1Page extends DetailPageEdit
    {
        protected function DoBeforeCreate()
        {
            $this->dataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`type_lookup`');
            $field = new StringField('nome');
            $this->dataset->AddField($field, true);
        }
    
        protected function CreatePageNavigator()
        {
            $result = new CompositePageNavigator($this);
            
            $partitionNavigator = new PageNavigator('pnav', $this, $this->dataset);
            $partitionNavigator->SetRowsPerPage(20);
            $result->AddPageNavigator($partitionNavigator);
            
            return $result;
        }
    
        public function GetPageList()
        {
            return null;
        }
    
        protected function CreateRssGenerator()
        {
            return null;
        }
    
        protected function CreateGridSearchControl($grid)
        {
            $grid->UseFilter = true;
            $grid->SearchControl = new SimpleSearch('type_lookupDetailEdit1ssearch', $this->dataset,
                array('nome'),
                array($this->RenderText('Nome')),
                array(
                    '=' => $this->GetLocalizerCaptions()->GetMessageString('equals'),
                    '<>' => $this->GetLocalizerCaptions()->GetMessageString('doesNotEquals'),
                    '<' => $this->GetLocalizerCaptions()->GetMessageString('isLessThan'),
                    '<=' => $this->GetLocalizerCaptions()->GetMessageString('isLessThanOrEqualsTo'),
                    '>' => $this->GetLocalizerCaptions()->GetMessageString('isGreaterThan'),
                    '>=' => $this->GetLocalizerCaptions()->GetMessageString('isGreaterThanOrEqualsTo'),
                    'ILIKE' => $this->GetLocalizerCaptions()->GetMessageString('Like'),
                    'STARTS' => $this->GetLocalizerCaptions()->GetMessageString('StartsWith'),
                    'ENDS' => $this->GetLocalizerCaptions()->GetMessageString('EndsWith'),
                    'CONTAINS' => $this->GetLocalizerCaptions()->GetMessageString('Contains')
                    ), $this->GetLocalizerCaptions(), $this, 'CONTAINS'
                );
        }
    
        protected function CreateGridAdvancedSearchControl($grid)
        {
            $this->AdvancedSearchControl = new AdvancedSearchControl('type_lookupDetailEdit1asearch', $this->dataset, $this->GetLocalizerCaptions());
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('nome', $this->RenderText('Nome')));
        }
    
        public function GetPageDirection()
        {
            return null;
        }
    
        protected function AddOperationsColumns($grid)
        {
            $actionsBandName = 'actions';
            $grid->AddBandToBegin($actionsBandName, $this->GetLocalizerCaptions()->GetMessageString('Actions'), true);
            if ($this->GetSecurityInfo()->HasViewGrant())
            {
                $column = $grid->AddViewColumn(new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('View'), OPERATION_VIEW, $this->dataset), $actionsBandName);
                $column->SetImagePath('images/view_action.png');
            }
            if ($this->GetSecurityInfo()->HasEditGrant())
            {
                $column = $grid->AddViewColumn(new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('Edit'), OPERATION_EDIT, $this->dataset), $actionsBandName);
                $column->SetImagePath('images/edit_action.png');
                $column->OnShow->AddListener('ShowEditButtonHandler', $this);
            }
            if ($this->GetSecurityInfo()->HasDeleteGrant())
            {
                $column = $grid->AddViewColumn(new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('Delete'), OPERATION_DELETE, $this->dataset), $actionsBandName);
                $column->SetImagePath('images/delete_action.png');
                $column->OnShow->AddListener('ShowDeleteButtonHandler', $this);
            }
            if ($this->GetSecurityInfo()->HasAddGrant())
            {
                $column = $grid->AddViewColumn(new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('Copy'), OPERATION_COPY, $this->dataset), $actionsBandName);
                $column->SetImagePath('images/copy_action.png');
            }
        }
    
        protected function AddFieldColumns($grid)
        {
            //
            // View column for nome field
            //
            $column = new TextViewColumn('nome', 'Nome', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for nome field
            //
            $editor = new TextEdit('nome_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('Nome', 'nome', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'Nome'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for nome field
            //
            $editor = new TextEdit('nome_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('Nome', 'nome', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'Nome'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
        }
    
        protected function AddSingleRecordViewColumns($grid)
        {
            //
            // View column for nome field
            //
            $column = new TextViewColumn('nome', 'Nome', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
        }
    
        protected function AddEditColumns($grid)
        {
            //
            // Edit column for nome field
            //
            $editor = new TextEdit('nome_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('Nome', 'nome', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'Nome'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
        }
    
        protected function AddInsertColumns($grid)
        {
            //
            // Edit column for nome field
            //
            $editor = new TextEdit('nome_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('Nome', 'nome', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'Nome'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            if ($this->GetSecurityInfo()->HasAddGrant())
            {
                $grid->SetShowAddButton(true);
                $grid->SetShowInlineAddButton(true);
            }
            else
            {
                $grid->SetShowInlineAddButton(false);
                $grid->SetShowAddButton(false);
            }
        }
    
        protected function AddPrintColumns($grid)
        {
            //
            // View column for nome field
            //
            $column = new TextViewColumn('nome', 'Nome', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
        }
    
        protected function AddExportColumns($grid)
        {
            //
            // View column for nome field
            //
            $column = new TextViewColumn('nome', 'Nome', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
        }
    
        protected function ApplyCommonColumnEditProperties($column)
        {
            $column->SetShowSetToNullCheckBox(true);
    	$column->SetVariableContainer($this->GetColumnVariableContainer());
        }
    
        function GetCustomClientScript()
        {
            return ;
        }
        
        function GetOnPageLoadedClientScript()
        {
            return ;
        }
        public function ShowEditButtonHandler($show)
        {
            if ($this->GetRecordPermission() != null)
                $show = $this->GetRecordPermission()->HasEditGrant($this->GetDataset());
        }
        public function ShowDeleteButtonHandler($show)
        {
            if ($this->GetRecordPermission() != null)
                $show = $this->GetRecordPermission()->HasDeleteGrant($this->GetDataset());
        }
    
        protected function CreateGrid()
        {
            $result = new Grid($this, $this->dataset, 'type_lookupDetailEditGrid1');
            if ($this->GetSecurityInfo()->HasDeleteGrant())
                $result->SetAllowDeleteSelected(true);
            else
                $result->SetAllowDeleteSelected(false);
            ApplyCommonPageSettings($this, $result);
            $result->SetUseImagesForActions(true);
            $result->SetUseFixedHeader(false);
            
            $result->SetHighlightRowAtHover(false);
            $result->SetWidth('');
            $this->CreateGridSearchControl($result);
            $this->CreateGridAdvancedSearchControl($result);
            $this->AddOperationsColumns($result);
            $this->AddFieldColumns($result);
            $this->AddSingleRecordViewColumns($result);
            $this->AddEditColumns($result);
            $this->AddInsertColumns($result);
            $this->AddPrintColumns($result);
            $this->AddExportColumns($result);
    
            $this->SetShowPageList(true);
            $this->SetExportToExcelAvailable(true);
            $this->SetExportToWordAvailable(true);
            $this->SetExportToXmlAvailable(true);
            $this->SetExportToCsvAvailable(true);
            $this->SetExportToPdfAvailable(true);
            $this->SetPrinterFriendlyAvailable(true);
            $this->SetSimpleSearchAvailable(true);
            $this->SetAdvancedSearchAvailable(true);
            $this->SetVisualEffectsEnabled(true);
            $this->SetShowTopPageNavigator(true);
            $this->SetShowBottomPageNavigator(true);
    
            //
            // Http Handlers
            //
    
            return $result;
        }
        
        protected function OpenAdvancedSearchByDefault()
        {
            return false;
        }
    
        protected function DoGetGridHeader()
        {
            return '';
        }    
    }
    ?><?php
    
    ?><?php
    
    class presenzePage extends Page
    {
        protected function DoBeforeCreate()
        {
            $this->dataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`presenze`');
            $field = new IntegerField('IDP', null, null, true);
            $this->dataset->AddField($field, true);
            $field = new IntegerField('GIOCATORE');
            $this->dataset->AddField($field, false);
            $field = new DateField('DATA');
            $this->dataset->AddField($field, false);
            $field = new IntegerField('GIORNO');
            $this->dataset->AddField($field, false);
            $field = new IntegerField('MESE');
            $this->dataset->AddField($field, false);
            $field = new IntegerField('ANNO');
            $this->dataset->AddField($field, false);
            $field = new StringField('STAGIONE');
            $this->dataset->AddField($field, false);
            $field = new StringField('TIPO');
            $this->dataset->AddField($field, false);
            $field = new IntegerField('SQUADRA');
            $this->dataset->AddField($field, false);
            $field = new StringField('CASTRASF');
            $this->dataset->AddField($field, false);
            $field = new IntegerField('GOLCASA');
            $this->dataset->AddField($field, false);
            $field = new IntegerField('GOLTRASF');
            $this->dataset->AddField($field, false);
            $field = new StringField('VNP');
            $this->dataset->AddField($field, false);
            $field = new IntegerField('MYGOL');
            $this->dataset->AddField($field, false);
            $field = new StringField('PROVDISC');
            $this->dataset->AddField($field, false);
            $field = new IntegerField('NUMGIALLI');
            $this->dataset->AddField($field, false);
            $field = new IntegerField('NUMROSSI');
            $this->dataset->AddField($field, false);
            $field = new StringField('SUBTYPE');
            $this->dataset->AddField($field, false);
            $field = new IntegerField('SUBMINUTE');
            $this->dataset->AddField($field, false);
            $field = new StringField('COMMENTO');
            $this->dataset->AddField($field, false);
            $field = new StringField('VIDEO');
            $this->dataset->AddField($field, false);
            $this->dataset->AddLookupField('GIOCATORE', 'giocatori', new IntegerField('IDG', null, null, true), new StringField('ALIAS', 'GIOCATORE_ALIAS', 'GIOCATORE_ALIAS_giocatori'), 'GIOCATORE_ALIAS_giocatori');
            $this->dataset->AddLookupField('STAGIONE', 'stagione_lookup', new StringField('varchar'), new StringField('varchar', 'STAGIONE_varchar', 'STAGIONE_varchar_stagione_lookup'), 'STAGIONE_varchar_stagione_lookup');
            $this->dataset->AddLookupField('TIPO', 'type_lookup', new StringField('nome'), new StringField('nome', 'TIPO_nome', 'TIPO_nome_type_lookup'), 'TIPO_nome_type_lookup');
            $this->dataset->AddLookupField('SQUADRA', 'squadre', new IntegerField('IDS', null, null, true), new StringField('NOME', 'SQUADRA_NOME', 'SQUADRA_NOME_squadre'), 'SQUADRA_NOME_squadre');
        }
    
        protected function CreatePageNavigator()
        {
            $result = new CompositePageNavigator($this);
            
            $partitionNavigator = new PageNavigator('pnav', $this, $this->dataset);
            $partitionNavigator->SetRowsPerPage(20);
            $result->AddPageNavigator($partitionNavigator);
            
            return $result;
        }
    
        public function GetPageList()
        {
            $currentPageCaption = $this->GetShortCaption();
            $result = new PageList();
            if (GetCurrentUserGrantForDataSource('giocatori')->HasViewGrant())
                $result->AddPage(new PageLink($this->RenderText('Giocatori'), 'giocatori.php', $this->RenderText('Giocatori'), $currentPageCaption == $this->RenderText('Giocatori')));
            if (GetCurrentUserGrantForDataSource('presenze')->HasViewGrant())
                $result->AddPage(new PageLink($this->RenderText('Presenze'), 'presenze.php', $this->RenderText('Presenze'), $currentPageCaption == $this->RenderText('Presenze')));
            if (GetCurrentUserGrantForDataSource('squadre')->HasViewGrant())
                $result->AddPage(new PageLink($this->RenderText('Squadre'), 'squadre.php', $this->RenderText('Squadre'), $currentPageCaption == $this->RenderText('Squadre')));
            if (GetCurrentUserGrantForDataSource('stagione_lookup')->HasViewGrant())
                $result->AddPage(new PageLink($this->RenderText('Stagione Lookup'), 'stagione_lookup.php', $this->RenderText('Stagione Lookup'), $currentPageCaption == $this->RenderText('Stagione Lookup')));
            if (GetCurrentUserGrantForDataSource('type_lookup')->HasViewGrant())
                $result->AddPage(new PageLink($this->RenderText('Type Lookup'), 'type_lookup.php', $this->RenderText('Type Lookup'), $currentPageCaption == $this->RenderText('Type Lookup')));
            return $result;
        }
    
        protected function CreateRssGenerator()
        {
            return null;
        }
    
        protected function CreateGridSearchControl($grid)
        {
            $grid->UseFilter = true;
            $grid->SearchControl = new SimpleSearch('presenzessearch', $this->dataset,
                array('IDP', 'GIOCATORE_ALIAS', 'DATA', 'GIORNO', 'MESE', 'ANNO', 'STAGIONE_varchar', 'TIPO_nome', 'SQUADRA_NOME', 'CASTRASF', 'GOLCASA', 'GOLTRASF', 'VNP', 'MYGOL', 'PROVDISC', 'NUMGIALLI', 'NUMROSSI', 'SUBTYPE', 'SUBMINUTE', 'COMMENTO', 'VIDEO'),
                array($this->RenderText('IDP'), $this->RenderText('GIOCATORE'), $this->RenderText('DATA'), $this->RenderText('GIORNO'), $this->RenderText('MESE'), $this->RenderText('ANNO'), $this->RenderText('STAGIONE'), $this->RenderText('TIPO'), $this->RenderText('SQUADRA'), $this->RenderText('CASTRASF'), $this->RenderText('GOLCASA'), $this->RenderText('GOLTRASF'), $this->RenderText('VNP'), $this->RenderText('MYGOL'), $this->RenderText('PROVDISC'), $this->RenderText('NUMGIALLI'), $this->RenderText('NUMROSSI'), $this->RenderText('SUBTYPE'), $this->RenderText('SUBMINUTE'), $this->RenderText('COMMENTO'), $this->RenderText('VIDEO')),
                array(
                    '=' => $this->GetLocalizerCaptions()->GetMessageString('equals'),
                    '<>' => $this->GetLocalizerCaptions()->GetMessageString('doesNotEquals'),
                    '<' => $this->GetLocalizerCaptions()->GetMessageString('isLessThan'),
                    '<=' => $this->GetLocalizerCaptions()->GetMessageString('isLessThanOrEqualsTo'),
                    '>' => $this->GetLocalizerCaptions()->GetMessageString('isGreaterThan'),
                    '>=' => $this->GetLocalizerCaptions()->GetMessageString('isGreaterThanOrEqualsTo'),
                    'ILIKE' => $this->GetLocalizerCaptions()->GetMessageString('Like'),
                    'STARTS' => $this->GetLocalizerCaptions()->GetMessageString('StartsWith'),
                    'ENDS' => $this->GetLocalizerCaptions()->GetMessageString('EndsWith'),
                    'CONTAINS' => $this->GetLocalizerCaptions()->GetMessageString('Contains')
                    ), $this->GetLocalizerCaptions(), $this, 'CONTAINS'
                );
        }
    
        protected function CreateGridAdvancedSearchControl($grid)
        {
            $this->AdvancedSearchControl = new AdvancedSearchControl('presenzeasearch', $this->dataset, $this->GetLocalizerCaptions());
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('IDP', $this->RenderText('IDP')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('GIOCATORE_ALIAS', $this->RenderText('GIOCATORE')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('DATA', $this->RenderText('DATA')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('GIORNO', $this->RenderText('GIORNO')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('MESE', $this->RenderText('MESE')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('ANNO', $this->RenderText('ANNO')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('STAGIONE_varchar', $this->RenderText('STAGIONE')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('TIPO_nome', $this->RenderText('TIPO')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('SQUADRA_NOME', $this->RenderText('SQUADRA')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('CASTRASF', $this->RenderText('CASTRASF')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('GOLCASA', $this->RenderText('GOLCASA')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('GOLTRASF', $this->RenderText('GOLTRASF')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('VNP', $this->RenderText('VNP')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('MYGOL', $this->RenderText('MYGOL')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('PROVDISC', $this->RenderText('PROVDISC')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('NUMGIALLI', $this->RenderText('NUMGIALLI')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('NUMROSSI', $this->RenderText('NUMROSSI')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('SUBTYPE', $this->RenderText('SUBTYPE')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('SUBMINUTE', $this->RenderText('SUBMINUTE')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('COMMENTO', $this->RenderText('COMMENTO')));
            $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('VIDEO', $this->RenderText('VIDEO')));
        }
    
        protected function AddOperationsColumns($grid)
        {
            $actionsBandName = 'actions';
            $grid->AddBandToBegin($actionsBandName, $this->GetLocalizerCaptions()->GetMessageString('Actions'), true);
            if ($this->GetSecurityInfo()->HasViewGrant())
            {
                $column = $grid->AddViewColumn(new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('View'), OPERATION_VIEW, $this->dataset), $actionsBandName);
                $column->SetImagePath('images/view_action.png');
            }
            if ($this->GetSecurityInfo()->HasEditGrant())
            {
                $column = $grid->AddViewColumn(new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('Edit'), OPERATION_EDIT, $this->dataset), $actionsBandName);
                $column->SetImagePath('images/edit_action.png');
                $column->OnShow->AddListener('ShowEditButtonHandler', $this);
            }
            if ($this->GetSecurityInfo()->HasDeleteGrant())
            {
                $column = $grid->AddViewColumn(new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('Delete'), OPERATION_DELETE, $this->dataset), $actionsBandName);
                $column->SetImagePath('images/delete_action.png');
                $column->OnShow->AddListener('ShowDeleteButtonHandler', $this);
            }
            if ($this->GetSecurityInfo()->HasAddGrant())
            {
                $column = $grid->AddViewColumn(new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('Copy'), OPERATION_COPY, $this->dataset), $actionsBandName);
                $column->SetImagePath('images/copy_action.png');
            }
        }
    
        protected function AddFieldColumns($grid)
        {
            if (GetCurrentUserGrantForDataSource('giocatoriDetailView0')->HasViewGrant())
            {
              //
            // View column for giocatoriDetailView0 detail
            //
            $column = new DetailColumn(array('GIOCATORE'), 'detail0', 'giocatoriDetailEdit0_handler', 'giocatoriDetailView0_handler', $this->dataset, 'Giocatori');
              $grid->AddViewColumn($column);
            }
            
            if (GetCurrentUserGrantForDataSource('type_lookupDetailView1')->HasViewGrant())
            {
              //
            // View column for type_lookupDetailView1 detail
            //
            $column = new DetailColumn(array('TIPO'), 'detail1', 'type_lookupDetailEdit1_handler', 'type_lookupDetailView1_handler', $this->dataset, 'Type Lookup');
              $grid->AddViewColumn($column);
            }
            
            //
            // View column for IDP field
            //
            $column = new TextViewColumn('IDP', 'IDP', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for ALIAS field
            //
            $column = new TextViewColumn('GIOCATORE_ALIAS', 'GIOCATORE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for GIOCATORE field
            //
            $editor = new ComboBox('giocatore_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`giocatori`');
            $field = new IntegerField('IDG', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('ALIAS');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('ALIAS', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'GIOCATORE', 
                'GIOCATORE', 
                $editor, 
                $this->dataset, 'IDG', 'ALIAS', $lookupDataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIOCATORE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for GIOCATORE field
            //
            $editor = new ComboBox('giocatore_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`giocatori`');
            $field = new IntegerField('IDG', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('ALIAS');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('ALIAS', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'GIOCATORE', 
                'GIOCATORE', 
                $editor, 
                $this->dataset, 'IDG', 'ALIAS', $lookupDataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIOCATORE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for DATA field
            //
            $column = new DateTimeViewColumn('DATA', 'DATA', $this->dataset);
            $column->SetDateTimeFormat('Y-m-d H:i:s');
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for DATA field
            //
            $editor = new DateTimeEdit('data_edit', true, 'Y-m-d H:i:s', 0);
            $editColumn = new CustomEditColumn('DATA', 'DATA', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'DATA'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for DATA field
            //
            $editor = new DateTimeEdit('data_edit', true, 'Y-m-d H:i:s', 0);
            $editColumn = new CustomEditColumn('DATA', 'DATA', $editor, $this->dataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'DATA'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for GIORNO field
            //
            $column = new TextViewColumn('GIORNO', 'GIORNO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for GIORNO field
            //
            $editor = new TextEdit('giorno_edit');
            $editColumn = new CustomEditColumn('GIORNO', 'GIORNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIORNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for GIORNO field
            //
            $editor = new TextEdit('giorno_edit');
            $editColumn = new CustomEditColumn('GIORNO', 'GIORNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIORNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for MESE field
            //
            $column = new TextViewColumn('MESE', 'MESE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for MESE field
            //
            $editor = new TextEdit('mese_edit');
            $editColumn = new CustomEditColumn('MESE', 'MESE', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'MESE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for MESE field
            //
            $editor = new TextEdit('mese_edit');
            $editColumn = new CustomEditColumn('MESE', 'MESE', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'MESE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for ANNO field
            //
            $column = new TextViewColumn('ANNO', 'ANNO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for ANNO field
            //
            $editor = new TextEdit('anno_edit');
            $editColumn = new CustomEditColumn('ANNO', 'ANNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'ANNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for ANNO field
            //
            $editor = new TextEdit('anno_edit');
            $editColumn = new CustomEditColumn('ANNO', 'ANNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'ANNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for varchar field
            //
            $column = new TextViewColumn('STAGIONE_varchar', 'STAGIONE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for STAGIONE field
            //
            $editor = new ComboBox('stagione_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`stagione_lookup`');
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('varchar', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'STAGIONE', 
                'STAGIONE', 
                $editor, 
                $this->dataset, 'varchar', 'varchar', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for STAGIONE field
            //
            $editor = new ComboBox('stagione_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`stagione_lookup`');
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('varchar', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'STAGIONE', 
                'STAGIONE', 
                $editor, 
                $this->dataset, 'varchar', 'varchar', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $editColumn->SetAllowSetToDefault(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for nome field
            //
            $column = new TextViewColumn('TIPO_nome', 'TIPO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for TIPO field
            //
            $editor = new ComboBox('tipo_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`type_lookup`');
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('nome', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'TIPO', 
                'TIPO', 
                $editor, 
                $this->dataset, 'nome', 'nome', $lookupDataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'TIPO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for TIPO field
            //
            $editor = new ComboBox('tipo_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`type_lookup`');
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('nome', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'TIPO', 
                'TIPO', 
                $editor, 
                $this->dataset, 'nome', 'nome', $lookupDataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'TIPO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for NOME field
            //
            $column = new TextViewColumn('SQUADRA_NOME', 'SQUADRA', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for SQUADRA field
            //
            $editor = new ComboBox('squadra_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`squadre`');
            $field = new IntegerField('IDS', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('NOME');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('NOME', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'SQUADRA', 
                'SQUADRA', 
                $editor, 
                $this->dataset, 'IDS', 'NOME', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for SQUADRA field
            //
            $editor = new ComboBox('squadra_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`squadre`');
            $field = new IntegerField('IDS', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('NOME');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('NOME', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'SQUADRA', 
                'SQUADRA', 
                $editor, 
                $this->dataset, 'IDS', 'NOME', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for CASTRASF field
            //
            $column = new TextViewColumn('CASTRASF', 'CASTRASF', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for CASTRASF field
            //
            $editor = new TextEdit('castrasf_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('CASTRASF', 'CASTRASF', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'CASTRASF'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for CASTRASF field
            //
            $editor = new TextEdit('castrasf_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('CASTRASF', 'CASTRASF', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'CASTRASF'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for GOLCASA field
            //
            $column = new TextViewColumn('GOLCASA', 'GOLCASA', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for GOLCASA field
            //
            $editor = new TextEdit('golcasa_edit');
            $editColumn = new CustomEditColumn('GOLCASA', 'GOLCASA', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for GOLCASA field
            //
            $editor = new TextEdit('golcasa_edit');
            $editColumn = new CustomEditColumn('GOLCASA', 'GOLCASA', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for GOLTRASF field
            //
            $column = new TextViewColumn('GOLTRASF', 'GOLTRASF', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for GOLTRASF field
            //
            $editor = new TextEdit('goltrasf_edit');
            $editColumn = new CustomEditColumn('GOLTRASF', 'GOLTRASF', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for GOLTRASF field
            //
            $editor = new TextEdit('goltrasf_edit');
            $editColumn = new CustomEditColumn('GOLTRASF', 'GOLTRASF', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for VNP field
            //
            $column = new TextViewColumn('VNP', 'VNP', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for VNP field
            //
            $editor = new TextEdit('vnp_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('VNP', 'VNP', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'VNP'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for VNP field
            //
            $editor = new TextEdit('vnp_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('VNP', 'VNP', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'VNP'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for MYGOL field
            //
            $column = new TextViewColumn('MYGOL', 'MYGOL', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for MYGOL field
            //
            $editor = new TextEdit('mygol_edit');
            $editColumn = new CustomEditColumn('MYGOL', 'MYGOL', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for MYGOL field
            //
            $editor = new TextEdit('mygol_edit');
            $editColumn = new CustomEditColumn('MYGOL', 'MYGOL', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for PROVDISC field
            //
            $column = new TextViewColumn('PROVDISC', 'PROVDISC', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for PROVDISC field
            //
            $editor = new TextEdit('provdisc_edit');
            $editor->SetSize(2);
            $editColumn = new CustomEditColumn('PROVDISC', 'PROVDISC', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'PROVDISC'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for PROVDISC field
            //
            $editor = new TextEdit('provdisc_edit');
            $editor->SetSize(2);
            $editColumn = new CustomEditColumn('PROVDISC', 'PROVDISC', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'PROVDISC'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for NUMGIALLI field
            //
            $column = new TextViewColumn('NUMGIALLI', 'NUMGIALLI', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for NUMGIALLI field
            //
            $editor = new TextEdit('numgialli_edit');
            $editColumn = new CustomEditColumn('NUMGIALLI', 'NUMGIALLI', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMGIALLI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for NUMGIALLI field
            //
            $editor = new TextEdit('numgialli_edit');
            $editColumn = new CustomEditColumn('NUMGIALLI', 'NUMGIALLI', $editor, $this->dataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMGIALLI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for NUMROSSI field
            //
            $column = new TextViewColumn('NUMROSSI', 'NUMROSSI', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for NUMROSSI field
            //
            $editor = new TextEdit('numrossi_edit');
            $editColumn = new CustomEditColumn('NUMROSSI', 'NUMROSSI', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMROSSI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for NUMROSSI field
            //
            $editor = new TextEdit('numrossi_edit');
            $editColumn = new CustomEditColumn('NUMROSSI', 'NUMROSSI', $editor, $this->dataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMROSSI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for SUBTYPE field
            //
            $column = new TextViewColumn('SUBTYPE', 'SUBTYPE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for SUBTYPE field
            //
            $editor = new TextEdit('subtype_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('SUBTYPE', 'SUBTYPE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for SUBTYPE field
            //
            $editor = new TextEdit('subtype_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('SUBTYPE', 'SUBTYPE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for SUBMINUTE field
            //
            $column = new TextViewColumn('SUBMINUTE', 'SUBMINUTE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for SUBMINUTE field
            //
            $editor = new TextEdit('subminute_edit');
            $editColumn = new CustomEditColumn('SUBMINUTE', 'SUBMINUTE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for SUBMINUTE field
            //
            $editor = new TextEdit('subminute_edit');
            $editColumn = new CustomEditColumn('SUBMINUTE', 'SUBMINUTE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for COMMENTO field
            //
            $column = new TextViewColumn('COMMENTO', 'COMMENTO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for COMMENTO field
            //
            $editor = new TextEdit('commento_edit');
            $editor->SetSize(60);
            $editColumn = new CustomEditColumn('COMMENTO', 'COMMENTO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for COMMENTO field
            //
            $editor = new TextEdit('commento_edit');
            $editor->SetSize(60);
            $editColumn = new CustomEditColumn('COMMENTO', 'COMMENTO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for VIDEO field
            //
            $column = new TextViewColumn('VIDEO', 'VIDEO', $this->dataset);
            $column->SetOrderable(true);
            $column->SetMaxLength(75);
            $column->SetFullTextWindowHandlerName('VIDEO_handler');
            
            /* <inline edit column> */
            //
            // Edit column for VIDEO field
            //
            $editor = new TextAreaEdit('video_edit', 50, 8);
            $editColumn = new CustomEditColumn('VIDEO', 'VIDEO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for VIDEO field
            //
            $editor = new TextAreaEdit('video_edit', 50, 8);
            $editColumn = new CustomEditColumn('VIDEO', 'VIDEO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
        }
    
        protected function AddSingleRecordViewColumns($grid)
        {
            //
            // View column for IDP field
            //
            $column = new TextViewColumn('IDP', 'IDP', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ALIAS field
            //
            $column = new TextViewColumn('GIOCATORE_ALIAS', 'GIOCATORE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for DATA field
            //
            $column = new DateTimeViewColumn('DATA', 'DATA', $this->dataset);
            $column->SetDateTimeFormat('Y-m-d H:i:s');
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for GIORNO field
            //
            $column = new TextViewColumn('GIORNO', 'GIORNO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for MESE field
            //
            $column = new TextViewColumn('MESE', 'MESE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ANNO field
            //
            $column = new TextViewColumn('ANNO', 'ANNO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for varchar field
            //
            $column = new TextViewColumn('STAGIONE_varchar', 'STAGIONE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for nome field
            //
            $column = new TextViewColumn('TIPO_nome', 'TIPO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for NOME field
            //
            $column = new TextViewColumn('SQUADRA_NOME', 'SQUADRA', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for CASTRASF field
            //
            $column = new TextViewColumn('CASTRASF', 'CASTRASF', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for GOLCASA field
            //
            $column = new TextViewColumn('GOLCASA', 'GOLCASA', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for GOLTRASF field
            //
            $column = new TextViewColumn('GOLTRASF', 'GOLTRASF', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for VNP field
            //
            $column = new TextViewColumn('VNP', 'VNP', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for MYGOL field
            //
            $column = new TextViewColumn('MYGOL', 'MYGOL', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for PROVDISC field
            //
            $column = new TextViewColumn('PROVDISC', 'PROVDISC', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for NUMGIALLI field
            //
            $column = new TextViewColumn('NUMGIALLI', 'NUMGIALLI', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for NUMROSSI field
            //
            $column = new TextViewColumn('NUMROSSI', 'NUMROSSI', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for SUBTYPE field
            //
            $column = new TextViewColumn('SUBTYPE', 'SUBTYPE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for SUBMINUTE field
            //
            $column = new TextViewColumn('SUBMINUTE', 'SUBMINUTE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for COMMENTO field
            //
            $column = new TextViewColumn('COMMENTO', 'COMMENTO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for VIDEO field
            //
            $column = new TextViewColumn('VIDEO', 'VIDEO', $this->dataset);
            $column->SetOrderable(true);
            $column->SetMaxLength(75);
            $column->SetFullTextWindowHandlerName('VIDEO_handler');
            $grid->AddSingleRecordViewColumn($column);
        }
    
        protected function AddEditColumns($grid)
        {
            //
            // Edit column for GIOCATORE field
            //
            $editor = new ComboBox('giocatore_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`giocatori`');
            $field = new IntegerField('IDG', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('ALIAS');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('ALIAS', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'GIOCATORE', 
                'GIOCATORE', 
                $editor, 
                $this->dataset, 'IDG', 'ALIAS', $lookupDataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIOCATORE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for DATA field
            //
            $editor = new DateTimeEdit('data_edit', true, 'Y-m-d H:i:s', 0);
            $editColumn = new CustomEditColumn('DATA', 'DATA', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'DATA'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for GIORNO field
            //
            $editor = new TextEdit('giorno_edit');
            $editColumn = new CustomEditColumn('GIORNO', 'GIORNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIORNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for MESE field
            //
            $editor = new TextEdit('mese_edit');
            $editColumn = new CustomEditColumn('MESE', 'MESE', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'MESE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for ANNO field
            //
            $editor = new TextEdit('anno_edit');
            $editColumn = new CustomEditColumn('ANNO', 'ANNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'ANNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for STAGIONE field
            //
            $editor = new ComboBox('stagione_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`stagione_lookup`');
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('varchar', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'STAGIONE', 
                'STAGIONE', 
                $editor, 
                $this->dataset, 'varchar', 'varchar', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for TIPO field
            //
            $editor = new ComboBox('tipo_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`type_lookup`');
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('nome', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'TIPO', 
                'TIPO', 
                $editor, 
                $this->dataset, 'nome', 'nome', $lookupDataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'TIPO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for SQUADRA field
            //
            $editor = new ComboBox('squadra_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`squadre`');
            $field = new IntegerField('IDS', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('NOME');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('NOME', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'SQUADRA', 
                'SQUADRA', 
                $editor, 
                $this->dataset, 'IDS', 'NOME', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for CASTRASF field
            //
            $editor = new TextEdit('castrasf_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('CASTRASF', 'CASTRASF', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'CASTRASF'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for GOLCASA field
            //
            $editor = new TextEdit('golcasa_edit');
            $editColumn = new CustomEditColumn('GOLCASA', 'GOLCASA', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for GOLTRASF field
            //
            $editor = new TextEdit('goltrasf_edit');
            $editColumn = new CustomEditColumn('GOLTRASF', 'GOLTRASF', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for VNP field
            //
            $editor = new TextEdit('vnp_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('VNP', 'VNP', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'VNP'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for MYGOL field
            //
            $editor = new TextEdit('mygol_edit');
            $editColumn = new CustomEditColumn('MYGOL', 'MYGOL', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for PROVDISC field
            //
            $editor = new TextEdit('provdisc_edit');
            $editor->SetSize(2);
            $editColumn = new CustomEditColumn('PROVDISC', 'PROVDISC', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'PROVDISC'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for NUMGIALLI field
            //
            $editor = new TextEdit('numgialli_edit');
            $editColumn = new CustomEditColumn('NUMGIALLI', 'NUMGIALLI', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMGIALLI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for NUMROSSI field
            //
            $editor = new TextEdit('numrossi_edit');
            $editColumn = new CustomEditColumn('NUMROSSI', 'NUMROSSI', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMROSSI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for SUBTYPE field
            //
            $editor = new TextEdit('subtype_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('SUBTYPE', 'SUBTYPE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for SUBMINUTE field
            //
            $editor = new TextEdit('subminute_edit');
            $editColumn = new CustomEditColumn('SUBMINUTE', 'SUBMINUTE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for COMMENTO field
            //
            $editor = new TextEdit('commento_edit');
            $editor->SetSize(60);
            $editColumn = new CustomEditColumn('COMMENTO', 'COMMENTO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for VIDEO field
            //
            $editor = new TextAreaEdit('video_edit', 50, 8);
            $editColumn = new CustomEditColumn('VIDEO', 'VIDEO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
        }
    
        protected function AddInsertColumns($grid)
        {
            //
            // Edit column for GIOCATORE field
            //
            $editor = new ComboBox('giocatore_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`giocatori`');
            $field = new IntegerField('IDG', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('ALIAS');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('ALIAS', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'GIOCATORE', 
                'GIOCATORE', 
                $editor, 
                $this->dataset, 'IDG', 'ALIAS', $lookupDataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIOCATORE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for DATA field
            //
            $editor = new DateTimeEdit('data_edit', true, 'Y-m-d H:i:s', 0);
            $editColumn = new CustomEditColumn('DATA', 'DATA', $editor, $this->dataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'DATA'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for GIORNO field
            //
            $editor = new TextEdit('giorno_edit');
            $editColumn = new CustomEditColumn('GIORNO', 'GIORNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIORNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for MESE field
            //
            $editor = new TextEdit('mese_edit');
            $editColumn = new CustomEditColumn('MESE', 'MESE', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'MESE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for ANNO field
            //
            $editor = new TextEdit('anno_edit');
            $editColumn = new CustomEditColumn('ANNO', 'ANNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'ANNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for STAGIONE field
            //
            $editor = new ComboBox('stagione_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`stagione_lookup`');
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('varchar', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'STAGIONE', 
                'STAGIONE', 
                $editor, 
                $this->dataset, 'varchar', 'varchar', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $editColumn->SetAllowSetToDefault(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for TIPO field
            //
            $editor = new ComboBox('tipo_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`type_lookup`');
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('nome', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'TIPO', 
                'TIPO', 
                $editor, 
                $this->dataset, 'nome', 'nome', $lookupDataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'TIPO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for SQUADRA field
            //
            $editor = new ComboBox('squadra_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`squadre`');
            $field = new IntegerField('IDS', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('NOME');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('NOME', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'SQUADRA', 
                'SQUADRA', 
                $editor, 
                $this->dataset, 'IDS', 'NOME', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for CASTRASF field
            //
            $editor = new TextEdit('castrasf_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('CASTRASF', 'CASTRASF', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'CASTRASF'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for GOLCASA field
            //
            $editor = new TextEdit('golcasa_edit');
            $editColumn = new CustomEditColumn('GOLCASA', 'GOLCASA', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for GOLTRASF field
            //
            $editor = new TextEdit('goltrasf_edit');
            $editColumn = new CustomEditColumn('GOLTRASF', 'GOLTRASF', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for VNP field
            //
            $editor = new TextEdit('vnp_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('VNP', 'VNP', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'VNP'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for MYGOL field
            //
            $editor = new TextEdit('mygol_edit');
            $editColumn = new CustomEditColumn('MYGOL', 'MYGOL', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for PROVDISC field
            //
            $editor = new TextEdit('provdisc_edit');
            $editor->SetSize(2);
            $editColumn = new CustomEditColumn('PROVDISC', 'PROVDISC', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'PROVDISC'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for NUMGIALLI field
            //
            $editor = new TextEdit('numgialli_edit');
            $editColumn = new CustomEditColumn('NUMGIALLI', 'NUMGIALLI', $editor, $this->dataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMGIALLI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for NUMROSSI field
            //
            $editor = new TextEdit('numrossi_edit');
            $editColumn = new CustomEditColumn('NUMROSSI', 'NUMROSSI', $editor, $this->dataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMROSSI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for SUBTYPE field
            //
            $editor = new TextEdit('subtype_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('SUBTYPE', 'SUBTYPE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for SUBMINUTE field
            //
            $editor = new TextEdit('subminute_edit');
            $editColumn = new CustomEditColumn('SUBMINUTE', 'SUBMINUTE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for COMMENTO field
            //
            $editor = new TextEdit('commento_edit');
            $editor->SetSize(60);
            $editColumn = new CustomEditColumn('COMMENTO', 'COMMENTO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for VIDEO field
            //
            $editor = new TextAreaEdit('video_edit', 50, 8);
            $editColumn = new CustomEditColumn('VIDEO', 'VIDEO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            if ($this->GetSecurityInfo()->HasAddGrant())
            {
                $grid->SetShowAddButton(true);
                $grid->SetShowInlineAddButton(true);
            }
            else
            {
                $grid->SetShowInlineAddButton(false);
                $grid->SetShowAddButton(false);
            }
        }
    
        protected function AddPrintColumns($grid)
        {
            //
            // View column for IDP field
            //
            $column = new TextViewColumn('IDP', 'IDP', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ALIAS field
            //
            $column = new TextViewColumn('GIOCATORE_ALIAS', 'GIOCATORE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for DATA field
            //
            $column = new DateTimeViewColumn('DATA', 'DATA', $this->dataset);
            $column->SetDateTimeFormat('Y-m-d H:i:s');
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for GIORNO field
            //
            $column = new TextViewColumn('GIORNO', 'GIORNO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for MESE field
            //
            $column = new TextViewColumn('MESE', 'MESE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ANNO field
            //
            $column = new TextViewColumn('ANNO', 'ANNO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for varchar field
            //
            $column = new TextViewColumn('STAGIONE_varchar', 'STAGIONE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for nome field
            //
            $column = new TextViewColumn('TIPO_nome', 'TIPO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for NOME field
            //
            $column = new TextViewColumn('SQUADRA_NOME', 'SQUADRA', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for CASTRASF field
            //
            $column = new TextViewColumn('CASTRASF', 'CASTRASF', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for GOLCASA field
            //
            $column = new TextViewColumn('GOLCASA', 'GOLCASA', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for GOLTRASF field
            //
            $column = new TextViewColumn('GOLTRASF', 'GOLTRASF', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for VNP field
            //
            $column = new TextViewColumn('VNP', 'VNP', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for MYGOL field
            //
            $column = new TextViewColumn('MYGOL', 'MYGOL', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for PROVDISC field
            //
            $column = new TextViewColumn('PROVDISC', 'PROVDISC', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for NUMGIALLI field
            //
            $column = new TextViewColumn('NUMGIALLI', 'NUMGIALLI', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for NUMROSSI field
            //
            $column = new TextViewColumn('NUMROSSI', 'NUMROSSI', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for SUBTYPE field
            //
            $column = new TextViewColumn('SUBTYPE', 'SUBTYPE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for SUBMINUTE field
            //
            $column = new TextViewColumn('SUBMINUTE', 'SUBMINUTE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for COMMENTO field
            //
            $column = new TextViewColumn('COMMENTO', 'COMMENTO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for VIDEO field
            //
            $column = new TextViewColumn('VIDEO', 'VIDEO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
        }
    
        protected function AddExportColumns($grid)
        {
            //
            // View column for IDP field
            //
            $column = new TextViewColumn('IDP', 'IDP', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ALIAS field
            //
            $column = new TextViewColumn('GIOCATORE_ALIAS', 'GIOCATORE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for DATA field
            //
            $column = new DateTimeViewColumn('DATA', 'DATA', $this->dataset);
            $column->SetDateTimeFormat('Y-m-d H:i:s');
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for GIORNO field
            //
            $column = new TextViewColumn('GIORNO', 'GIORNO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for MESE field
            //
            $column = new TextViewColumn('MESE', 'MESE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ANNO field
            //
            $column = new TextViewColumn('ANNO', 'ANNO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for varchar field
            //
            $column = new TextViewColumn('STAGIONE_varchar', 'STAGIONE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for nome field
            //
            $column = new TextViewColumn('TIPO_nome', 'TIPO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for NOME field
            //
            $column = new TextViewColumn('SQUADRA_NOME', 'SQUADRA', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for CASTRASF field
            //
            $column = new TextViewColumn('CASTRASF', 'CASTRASF', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for GOLCASA field
            //
            $column = new TextViewColumn('GOLCASA', 'GOLCASA', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for GOLTRASF field
            //
            $column = new TextViewColumn('GOLTRASF', 'GOLTRASF', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for VNP field
            //
            $column = new TextViewColumn('VNP', 'VNP', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for MYGOL field
            //
            $column = new TextViewColumn('MYGOL', 'MYGOL', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for PROVDISC field
            //
            $column = new TextViewColumn('PROVDISC', 'PROVDISC', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for NUMGIALLI field
            //
            $column = new TextViewColumn('NUMGIALLI', 'NUMGIALLI', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for NUMROSSI field
            //
            $column = new TextViewColumn('NUMROSSI', 'NUMROSSI', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for SUBTYPE field
            //
            $column = new TextViewColumn('SUBTYPE', 'SUBTYPE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for SUBMINUTE field
            //
            $column = new TextViewColumn('SUBMINUTE', 'SUBMINUTE', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for COMMENTO field
            //
            $column = new TextViewColumn('COMMENTO', 'COMMENTO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for VIDEO field
            //
            $column = new TextViewColumn('VIDEO', 'VIDEO', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
        }
    
        public function GetPageDirection()
        {
            return null;
        }
    
        protected function ApplyCommonColumnEditProperties($column)
        {
            $column->SetShowSetToNullCheckBox(true);
    	$column->SetVariableContainer($this->GetColumnVariableContainer());
        }
    
        function CreateMasterDetailRecordGridForgiocatoriDetailEdit0Grid()
        {
            $result = new Grid($this, $this->dataset, 'MasterDetailRecordGridForgiocatoriDetailEdit0');
            $result->SetAllowDeleteSelected(false);
            $result->SetShowUpdateLink(false);
            $result->SetEnabledInlineEditing(false);
            $result->SetName('master_grid');
            //
            // View column for IDP field
            //
            $column = new TextViewColumn('IDP', 'IDP', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for ALIAS field
            //
            $column = new TextViewColumn('GIOCATORE_ALIAS', 'GIOCATORE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for GIOCATORE field
            //
            $editor = new ComboBox('giocatore_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`giocatori`');
            $field = new IntegerField('IDG', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('ALIAS');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('ALIAS', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'GIOCATORE', 
                'GIOCATORE', 
                $editor, 
                $this->dataset, 'IDG', 'ALIAS', $lookupDataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIOCATORE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for GIOCATORE field
            //
            $editor = new ComboBox('giocatore_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`giocatori`');
            $field = new IntegerField('IDG', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('ALIAS');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('ALIAS', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'GIOCATORE', 
                'GIOCATORE', 
                $editor, 
                $this->dataset, 'IDG', 'ALIAS', $lookupDataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIOCATORE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for DATA field
            //
            $column = new DateTimeViewColumn('DATA', 'DATA', $this->dataset);
            $column->SetDateTimeFormat('Y-m-d H:i:s');
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for DATA field
            //
            $editor = new DateTimeEdit('data_edit', true, 'Y-m-d H:i:s', 0);
            $editColumn = new CustomEditColumn('DATA', 'DATA', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'DATA'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for DATA field
            //
            $editor = new DateTimeEdit('data_edit', true, 'Y-m-d H:i:s', 0);
            $editColumn = new CustomEditColumn('DATA', 'DATA', $editor, $this->dataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'DATA'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for GIORNO field
            //
            $column = new TextViewColumn('GIORNO', 'GIORNO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for GIORNO field
            //
            $editor = new TextEdit('giorno_edit');
            $editColumn = new CustomEditColumn('GIORNO', 'GIORNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIORNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for GIORNO field
            //
            $editor = new TextEdit('giorno_edit');
            $editColumn = new CustomEditColumn('GIORNO', 'GIORNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIORNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for MESE field
            //
            $column = new TextViewColumn('MESE', 'MESE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for MESE field
            //
            $editor = new TextEdit('mese_edit');
            $editColumn = new CustomEditColumn('MESE', 'MESE', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'MESE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for MESE field
            //
            $editor = new TextEdit('mese_edit');
            $editColumn = new CustomEditColumn('MESE', 'MESE', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'MESE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for ANNO field
            //
            $column = new TextViewColumn('ANNO', 'ANNO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for ANNO field
            //
            $editor = new TextEdit('anno_edit');
            $editColumn = new CustomEditColumn('ANNO', 'ANNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'ANNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for ANNO field
            //
            $editor = new TextEdit('anno_edit');
            $editColumn = new CustomEditColumn('ANNO', 'ANNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'ANNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for varchar field
            //
            $column = new TextViewColumn('STAGIONE_varchar', 'STAGIONE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for STAGIONE field
            //
            $editor = new ComboBox('stagione_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`stagione_lookup`');
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('varchar', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'STAGIONE', 
                'STAGIONE', 
                $editor, 
                $this->dataset, 'varchar', 'varchar', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for STAGIONE field
            //
            $editor = new ComboBox('stagione_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`stagione_lookup`');
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('varchar', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'STAGIONE', 
                'STAGIONE', 
                $editor, 
                $this->dataset, 'varchar', 'varchar', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $editColumn->SetAllowSetToDefault(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for nome field
            //
            $column = new TextViewColumn('TIPO_nome', 'TIPO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for TIPO field
            //
            $editor = new ComboBox('tipo_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`type_lookup`');
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('nome', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'TIPO', 
                'TIPO', 
                $editor, 
                $this->dataset, 'nome', 'nome', $lookupDataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'TIPO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for TIPO field
            //
            $editor = new ComboBox('tipo_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`type_lookup`');
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('nome', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'TIPO', 
                'TIPO', 
                $editor, 
                $this->dataset, 'nome', 'nome', $lookupDataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'TIPO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for NOME field
            //
            $column = new TextViewColumn('SQUADRA_NOME', 'SQUADRA', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for SQUADRA field
            //
            $editor = new ComboBox('squadra_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`squadre`');
            $field = new IntegerField('IDS', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('NOME');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('NOME', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'SQUADRA', 
                'SQUADRA', 
                $editor, 
                $this->dataset, 'IDS', 'NOME', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for SQUADRA field
            //
            $editor = new ComboBox('squadra_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`squadre`');
            $field = new IntegerField('IDS', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('NOME');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('NOME', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'SQUADRA', 
                'SQUADRA', 
                $editor, 
                $this->dataset, 'IDS', 'NOME', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for CASTRASF field
            //
            $column = new TextViewColumn('CASTRASF', 'CASTRASF', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for CASTRASF field
            //
            $editor = new TextEdit('castrasf_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('CASTRASF', 'CASTRASF', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'CASTRASF'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for CASTRASF field
            //
            $editor = new TextEdit('castrasf_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('CASTRASF', 'CASTRASF', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'CASTRASF'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for GOLCASA field
            //
            $column = new TextViewColumn('GOLCASA', 'GOLCASA', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for GOLCASA field
            //
            $editor = new TextEdit('golcasa_edit');
            $editColumn = new CustomEditColumn('GOLCASA', 'GOLCASA', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for GOLCASA field
            //
            $editor = new TextEdit('golcasa_edit');
            $editColumn = new CustomEditColumn('GOLCASA', 'GOLCASA', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for GOLTRASF field
            //
            $column = new TextViewColumn('GOLTRASF', 'GOLTRASF', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for GOLTRASF field
            //
            $editor = new TextEdit('goltrasf_edit');
            $editColumn = new CustomEditColumn('GOLTRASF', 'GOLTRASF', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for GOLTRASF field
            //
            $editor = new TextEdit('goltrasf_edit');
            $editColumn = new CustomEditColumn('GOLTRASF', 'GOLTRASF', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for VNP field
            //
            $column = new TextViewColumn('VNP', 'VNP', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for VNP field
            //
            $editor = new TextEdit('vnp_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('VNP', 'VNP', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'VNP'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for VNP field
            //
            $editor = new TextEdit('vnp_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('VNP', 'VNP', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'VNP'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for MYGOL field
            //
            $column = new TextViewColumn('MYGOL', 'MYGOL', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for MYGOL field
            //
            $editor = new TextEdit('mygol_edit');
            $editColumn = new CustomEditColumn('MYGOL', 'MYGOL', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for MYGOL field
            //
            $editor = new TextEdit('mygol_edit');
            $editColumn = new CustomEditColumn('MYGOL', 'MYGOL', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for PROVDISC field
            //
            $column = new TextViewColumn('PROVDISC', 'PROVDISC', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for PROVDISC field
            //
            $editor = new TextEdit('provdisc_edit');
            $editor->SetSize(2);
            $editColumn = new CustomEditColumn('PROVDISC', 'PROVDISC', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'PROVDISC'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for PROVDISC field
            //
            $editor = new TextEdit('provdisc_edit');
            $editor->SetSize(2);
            $editColumn = new CustomEditColumn('PROVDISC', 'PROVDISC', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'PROVDISC'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for NUMGIALLI field
            //
            $column = new TextViewColumn('NUMGIALLI', 'NUMGIALLI', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for NUMGIALLI field
            //
            $editor = new TextEdit('numgialli_edit');
            $editColumn = new CustomEditColumn('NUMGIALLI', 'NUMGIALLI', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMGIALLI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for NUMGIALLI field
            //
            $editor = new TextEdit('numgialli_edit');
            $editColumn = new CustomEditColumn('NUMGIALLI', 'NUMGIALLI', $editor, $this->dataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMGIALLI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for NUMROSSI field
            //
            $column = new TextViewColumn('NUMROSSI', 'NUMROSSI', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for NUMROSSI field
            //
            $editor = new TextEdit('numrossi_edit');
            $editColumn = new CustomEditColumn('NUMROSSI', 'NUMROSSI', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMROSSI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for NUMROSSI field
            //
            $editor = new TextEdit('numrossi_edit');
            $editColumn = new CustomEditColumn('NUMROSSI', 'NUMROSSI', $editor, $this->dataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMROSSI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for SUBTYPE field
            //
            $column = new TextViewColumn('SUBTYPE', 'SUBTYPE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for SUBTYPE field
            //
            $editor = new TextEdit('subtype_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('SUBTYPE', 'SUBTYPE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for SUBTYPE field
            //
            $editor = new TextEdit('subtype_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('SUBTYPE', 'SUBTYPE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for SUBMINUTE field
            //
            $column = new TextViewColumn('SUBMINUTE', 'SUBMINUTE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for SUBMINUTE field
            //
            $editor = new TextEdit('subminute_edit');
            $editColumn = new CustomEditColumn('SUBMINUTE', 'SUBMINUTE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for SUBMINUTE field
            //
            $editor = new TextEdit('subminute_edit');
            $editColumn = new CustomEditColumn('SUBMINUTE', 'SUBMINUTE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for COMMENTO field
            //
            $column = new TextViewColumn('COMMENTO', 'COMMENTO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for COMMENTO field
            //
            $editor = new TextEdit('commento_edit');
            $editor->SetSize(60);
            $editColumn = new CustomEditColumn('COMMENTO', 'COMMENTO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for COMMENTO field
            //
            $editor = new TextEdit('commento_edit');
            $editor->SetSize(60);
            $editColumn = new CustomEditColumn('COMMENTO', 'COMMENTO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for VIDEO field
            //
            $column = new TextViewColumn('VIDEO', 'VIDEO', $this->dataset);
            $column->SetOrderable(true);
            $column->SetMaxLength(75);
            $column->SetFullTextWindowHandlerName('VIDEO_handler');
            
            /* <inline edit column> */
            //
            // Edit column for VIDEO field
            //
            $editor = new TextAreaEdit('video_edit', 50, 8);
            $editColumn = new CustomEditColumn('VIDEO', 'VIDEO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for VIDEO field
            //
            $editor = new TextAreaEdit('video_edit', 50, 8);
            $editColumn = new CustomEditColumn('VIDEO', 'VIDEO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            return $result;
        }
        function CreateMasterDetailRecordGridFortype_lookupDetailEdit1Grid()
        {
            $result = new Grid($this, $this->dataset, 'MasterDetailRecordGridFortype_lookupDetailEdit1');
            $result->SetAllowDeleteSelected(false);
            $result->SetShowUpdateLink(false);
            $result->SetEnabledInlineEditing(false);
            $result->SetName('master_grid');
            //
            // View column for IDP field
            //
            $column = new TextViewColumn('IDP', 'IDP', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for ALIAS field
            //
            $column = new TextViewColumn('GIOCATORE_ALIAS', 'GIOCATORE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for GIOCATORE field
            //
            $editor = new ComboBox('giocatore_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`giocatori`');
            $field = new IntegerField('IDG', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('ALIAS');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('ALIAS', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'GIOCATORE', 
                'GIOCATORE', 
                $editor, 
                $this->dataset, 'IDG', 'ALIAS', $lookupDataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIOCATORE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for GIOCATORE field
            //
            $editor = new ComboBox('giocatore_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`giocatori`');
            $field = new IntegerField('IDG', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('ALIAS');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('ALIAS', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'GIOCATORE', 
                'GIOCATORE', 
                $editor, 
                $this->dataset, 'IDG', 'ALIAS', $lookupDataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIOCATORE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for DATA field
            //
            $column = new DateTimeViewColumn('DATA', 'DATA', $this->dataset);
            $column->SetDateTimeFormat('Y-m-d H:i:s');
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for DATA field
            //
            $editor = new DateTimeEdit('data_edit', true, 'Y-m-d H:i:s', 0);
            $editColumn = new CustomEditColumn('DATA', 'DATA', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'DATA'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for DATA field
            //
            $editor = new DateTimeEdit('data_edit', true, 'Y-m-d H:i:s', 0);
            $editColumn = new CustomEditColumn('DATA', 'DATA', $editor, $this->dataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'DATA'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for GIORNO field
            //
            $column = new TextViewColumn('GIORNO', 'GIORNO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for GIORNO field
            //
            $editor = new TextEdit('giorno_edit');
            $editColumn = new CustomEditColumn('GIORNO', 'GIORNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIORNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for GIORNO field
            //
            $editor = new TextEdit('giorno_edit');
            $editColumn = new CustomEditColumn('GIORNO', 'GIORNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'GIORNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for MESE field
            //
            $column = new TextViewColumn('MESE', 'MESE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for MESE field
            //
            $editor = new TextEdit('mese_edit');
            $editColumn = new CustomEditColumn('MESE', 'MESE', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'MESE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for MESE field
            //
            $editor = new TextEdit('mese_edit');
            $editColumn = new CustomEditColumn('MESE', 'MESE', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'MESE'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for ANNO field
            //
            $column = new TextViewColumn('ANNO', 'ANNO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for ANNO field
            //
            $editor = new TextEdit('anno_edit');
            $editColumn = new CustomEditColumn('ANNO', 'ANNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'ANNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for ANNO field
            //
            $editor = new TextEdit('anno_edit');
            $editColumn = new CustomEditColumn('ANNO', 'ANNO', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'ANNO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for varchar field
            //
            $column = new TextViewColumn('STAGIONE_varchar', 'STAGIONE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for STAGIONE field
            //
            $editor = new ComboBox('stagione_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`stagione_lookup`');
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('varchar', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'STAGIONE', 
                'STAGIONE', 
                $editor, 
                $this->dataset, 'varchar', 'varchar', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for STAGIONE field
            //
            $editor = new ComboBox('stagione_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`stagione_lookup`');
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $field = new StringField('varchar');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('varchar', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'STAGIONE', 
                'STAGIONE', 
                $editor, 
                $this->dataset, 'varchar', 'varchar', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $editColumn->SetAllowSetToDefault(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for nome field
            //
            $column = new TextViewColumn('TIPO_nome', 'TIPO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for TIPO field
            //
            $editor = new ComboBox('tipo_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`type_lookup`');
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('nome', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'TIPO', 
                'TIPO', 
                $editor, 
                $this->dataset, 'nome', 'nome', $lookupDataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'TIPO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for TIPO field
            //
            $editor = new ComboBox('tipo_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`type_lookup`');
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $field = new StringField('nome');
            $lookupDataset->AddField($field, true);
            $lookupDataset->SetOrderBy('nome', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'TIPO', 
                'TIPO', 
                $editor, 
                $this->dataset, 'nome', 'nome', $lookupDataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'TIPO'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for NOME field
            //
            $column = new TextViewColumn('SQUADRA_NOME', 'SQUADRA', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for SQUADRA field
            //
            $editor = new ComboBox('squadra_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`squadre`');
            $field = new IntegerField('IDS', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('NOME');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('NOME', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'SQUADRA', 
                'SQUADRA', 
                $editor, 
                $this->dataset, 'IDS', 'NOME', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for SQUADRA field
            //
            $editor = new ComboBox('squadra_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
            $lookupDataset = new TableDataset(
                new MyConnectionFactory(),
                GetConnectionOptions(),
                '`squadre`');
            $field = new IntegerField('IDS', null, null, true);
            $lookupDataset->AddField($field, true);
            $field = new StringField('NOME');
            $lookupDataset->AddField($field, false);
            $lookupDataset->SetOrderBy('NOME', GetOrderTypeAsSQL(otAscending));
            $editColumn = new LookUpEditColumn(
                'SQUADRA', 
                'SQUADRA', 
                $editor, 
                $this->dataset, 'IDS', 'NOME', $lookupDataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for CASTRASF field
            //
            $column = new TextViewColumn('CASTRASF', 'CASTRASF', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for CASTRASF field
            //
            $editor = new TextEdit('castrasf_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('CASTRASF', 'CASTRASF', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'CASTRASF'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for CASTRASF field
            //
            $editor = new TextEdit('castrasf_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('CASTRASF', 'CASTRASF', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'CASTRASF'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for GOLCASA field
            //
            $column = new TextViewColumn('GOLCASA', 'GOLCASA', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for GOLCASA field
            //
            $editor = new TextEdit('golcasa_edit');
            $editColumn = new CustomEditColumn('GOLCASA', 'GOLCASA', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for GOLCASA field
            //
            $editor = new TextEdit('golcasa_edit');
            $editColumn = new CustomEditColumn('GOLCASA', 'GOLCASA', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for GOLTRASF field
            //
            $column = new TextViewColumn('GOLTRASF', 'GOLTRASF', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for GOLTRASF field
            //
            $editor = new TextEdit('goltrasf_edit');
            $editColumn = new CustomEditColumn('GOLTRASF', 'GOLTRASF', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for GOLTRASF field
            //
            $editor = new TextEdit('goltrasf_edit');
            $editColumn = new CustomEditColumn('GOLTRASF', 'GOLTRASF', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for VNP field
            //
            $column = new TextViewColumn('VNP', 'VNP', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for VNP field
            //
            $editor = new TextEdit('vnp_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('VNP', 'VNP', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'VNP'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for VNP field
            //
            $editor = new TextEdit('vnp_edit');
            $editor->SetSize(1);
            $editColumn = new CustomEditColumn('VNP', 'VNP', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'VNP'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for MYGOL field
            //
            $column = new TextViewColumn('MYGOL', 'MYGOL', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for MYGOL field
            //
            $editor = new TextEdit('mygol_edit');
            $editColumn = new CustomEditColumn('MYGOL', 'MYGOL', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for MYGOL field
            //
            $editor = new TextEdit('mygol_edit');
            $editColumn = new CustomEditColumn('MYGOL', 'MYGOL', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for PROVDISC field
            //
            $column = new TextViewColumn('PROVDISC', 'PROVDISC', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for PROVDISC field
            //
            $editor = new TextEdit('provdisc_edit');
            $editor->SetSize(2);
            $editColumn = new CustomEditColumn('PROVDISC', 'PROVDISC', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'PROVDISC'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for PROVDISC field
            //
            $editor = new TextEdit('provdisc_edit');
            $editor->SetSize(2);
            $editColumn = new CustomEditColumn('PROVDISC', 'PROVDISC', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'PROVDISC'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for NUMGIALLI field
            //
            $column = new TextViewColumn('NUMGIALLI', 'NUMGIALLI', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for NUMGIALLI field
            //
            $editor = new TextEdit('numgialli_edit');
            $editColumn = new CustomEditColumn('NUMGIALLI', 'NUMGIALLI', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMGIALLI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for NUMGIALLI field
            //
            $editor = new TextEdit('numgialli_edit');
            $editColumn = new CustomEditColumn('NUMGIALLI', 'NUMGIALLI', $editor, $this->dataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMGIALLI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for NUMROSSI field
            //
            $column = new TextViewColumn('NUMROSSI', 'NUMROSSI', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for NUMROSSI field
            //
            $editor = new TextEdit('numrossi_edit');
            $editColumn = new CustomEditColumn('NUMROSSI', 'NUMROSSI', $editor, $this->dataset);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMROSSI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for NUMROSSI field
            //
            $editor = new TextEdit('numrossi_edit');
            $editColumn = new CustomEditColumn('NUMROSSI', 'NUMROSSI', $editor, $this->dataset);
            $editColumn->SetAllowSetToDefault(true);
            $validator = new NotEmptyValidator(sprintf($this->GetLocalizerCaptions()->GetMessageString('FieldValueRequiredErrorMsg'), 'NUMROSSI'));
            $editColumn->AddValidator($validator);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for SUBTYPE field
            //
            $column = new TextViewColumn('SUBTYPE', 'SUBTYPE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for SUBTYPE field
            //
            $editor = new TextEdit('subtype_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('SUBTYPE', 'SUBTYPE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for SUBTYPE field
            //
            $editor = new TextEdit('subtype_edit');
            $editor->SetSize(3);
            $editColumn = new CustomEditColumn('SUBTYPE', 'SUBTYPE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for SUBMINUTE field
            //
            $column = new TextViewColumn('SUBMINUTE', 'SUBMINUTE', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for SUBMINUTE field
            //
            $editor = new TextEdit('subminute_edit');
            $editColumn = new CustomEditColumn('SUBMINUTE', 'SUBMINUTE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for SUBMINUTE field
            //
            $editor = new TextEdit('subminute_edit');
            $editColumn = new CustomEditColumn('SUBMINUTE', 'SUBMINUTE', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for COMMENTO field
            //
            $column = new TextViewColumn('COMMENTO', 'COMMENTO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for COMMENTO field
            //
            $editor = new TextEdit('commento_edit');
            $editor->SetSize(60);
            $editColumn = new CustomEditColumn('COMMENTO', 'COMMENTO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for COMMENTO field
            //
            $editor = new TextEdit('commento_edit');
            $editor->SetSize(60);
            $editColumn = new CustomEditColumn('COMMENTO', 'COMMENTO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            //
            // View column for VIDEO field
            //
            $column = new TextViewColumn('VIDEO', 'VIDEO', $this->dataset);
            $column->SetOrderable(true);
            $column->SetMaxLength(75);
            $column->SetFullTextWindowHandlerName('VIDEO_handler');
            
            /* <inline edit column> */
            //
            // Edit column for VIDEO field
            //
            $editor = new TextAreaEdit('video_edit', 50, 8);
            $editColumn = new CustomEditColumn('VIDEO', 'VIDEO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for VIDEO field
            //
            $editor = new TextAreaEdit('video_edit', 50, 8);
            $editColumn = new CustomEditColumn('VIDEO', 'VIDEO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $column->SetDescription($this->RenderText(''));
            $column->SetFixedWidth(null);
            $result->AddViewColumn($column);
            
            return $result;
        }
        
        function GetCustomClientScript()
        {
            return ;
        }
        
        function GetOnPageLoadedClientScript()
        {
            return ;
        }
        public function ShowEditButtonHandler($show)
        {
            if ($this->GetRecordPermission() != null)
                $show = $this->GetRecordPermission()->HasEditGrant($this->GetDataset());
        }
        public function ShowDeleteButtonHandler($show)
        {
            if ($this->GetRecordPermission() != null)
                $show = $this->GetRecordPermission()->HasDeleteGrant($this->GetDataset());
        }
    
        protected function CreateGrid()
        {
            $result = new Grid($this, $this->dataset, 'presenzeGrid');
            if ($this->GetSecurityInfo()->HasDeleteGrant())
               $result->SetAllowDeleteSelected(true);
            else
               $result->SetAllowDeleteSelected(false);   
            
            ApplyCommonPageSettings($this, $result);
            
            $result->SetUseImagesForActions(true);
            $result->SetUseFixedHeader(false);
            
            $result->SetHighlightRowAtHover(false);
            $result->SetWidth('');
            $this->CreateGridSearchControl($result);
            $this->CreateGridAdvancedSearchControl($result);
            $this->AddOperationsColumns($result);
            $this->AddFieldColumns($result);
            $this->AddSingleRecordViewColumns($result);
            $this->AddEditColumns($result);
            $this->AddInsertColumns($result);
            $this->AddPrintColumns($result);
            $this->AddExportColumns($result);
    
            $this->SetShowPageList(true);
            $this->SetExportToExcelAvailable(true);
            $this->SetExportToWordAvailable(true);
            $this->SetExportToXmlAvailable(true);
            $this->SetExportToCsvAvailable(true);
            $this->SetExportToPdfAvailable(true);
            $this->SetPrinterFriendlyAvailable(true);
            $this->SetSimpleSearchAvailable(true);
            $this->SetAdvancedSearchAvailable(true);
            $this->SetVisualEffectsEnabled(true);
            $this->SetShowTopPageNavigator(true);
            $this->SetShowBottomPageNavigator(true);
    
            //
            // Http Handlers
            //
            $handler = new PageHTTPHandler('giocatoriDetailView0_handler', new giocatoriDetailView0Page('Giocatori', 'Giocatori', array('IDG'), GetCurrentUserGrantForDataSource('giocatoriDetailView0'), 'UTF-8', 20, 'giocatoriDetailEdit0_handler'));
            GetApplication()->RegisterHTTPHandler($handler);
            $pageEdit = new giocatoriDetailEdit0Page($this, array('IDG'), array('GIOCATORE'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridForgiocatoriDetailEdit0Grid(), $this->dataset, GetCurrentUserGrantForDataSource('giocatoriDetailEdit0'), 'UTF-8');
            $pageEdit->SetShortCaption('Giocatori');
            $pageEdit->SetHeader(GetPagesHeader());
            $pageEdit->SetFooter(GetPagesFooter());
            $pageEdit->SetCaption('Giocatori');
            $pageEdit->SetHttpHandlerName('giocatoriDetailEdit0_handler');
            $handler = new PageHTTPHandler('giocatoriDetailEdit0_handler', $pageEdit);
            GetApplication()->RegisterHTTPHandler($handler);
            $handler = new PageHTTPHandler('type_lookupDetailView1_handler', new type_lookupDetailView1Page('Type Lookup', 'Type Lookup', array('nome'), GetCurrentUserGrantForDataSource('type_lookupDetailView1'), 'UTF-8', 20, 'type_lookupDetailEdit1_handler'));
            GetApplication()->RegisterHTTPHandler($handler);
            $pageEdit = new type_lookupDetailEdit1Page($this, array('nome'), array('TIPO'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridFortype_lookupDetailEdit1Grid(), $this->dataset, GetCurrentUserGrantForDataSource('type_lookupDetailEdit1'), 'UTF-8');
            $pageEdit->SetShortCaption('Type Lookup');
            $pageEdit->SetHeader(GetPagesHeader());
            $pageEdit->SetFooter(GetPagesFooter());
            $pageEdit->SetCaption('Type Lookup');
            $pageEdit->SetHttpHandlerName('type_lookupDetailEdit1_handler');
            $handler = new PageHTTPHandler('type_lookupDetailEdit1_handler', $pageEdit);
            GetApplication()->RegisterHTTPHandler($handler);
            //
            // View column for VIDEO field
            //
            $column = new TextViewColumn('VIDEO', 'VIDEO', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for VIDEO field
            //
            $editor = new TextAreaEdit('video_edit', 50, 8);
            $editColumn = new CustomEditColumn('VIDEO', 'VIDEO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetEditOperationColumn($editColumn);
            /* </inline edit column> */
            
            /* <inline insert column> */
            //
            // Edit column for VIDEO field
            //
            $editor = new TextAreaEdit('video_edit', 50, 8);
            $editColumn = new CustomEditColumn('VIDEO', 'VIDEO', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $column->SetInsertOperationColumn($editColumn);
            /* </inline insert column> */
            $handler = new ShowTextBlobHandler($this->dataset, $this, 'VIDEO_handler', $column);
            GetApplication()->RegisterHTTPHandler($handler);//
            // View column for VIDEO field
            //
            $column = new TextViewColumn('VIDEO', 'VIDEO', $this->dataset);
            $column->SetOrderable(true);
            $handler = new ShowTextBlobHandler($this->dataset, $this, 'VIDEO_handler', $column);
            GetApplication()->RegisterHTTPHandler($handler);
            return $result;
        }
        
        protected function OpenAdvancedSearchByDefault()
        {
            return false;
        }
    
        protected function DoGetGridHeader()
        {
            return '';
        }
    }

    SetUpUserAuthorization(GetApplication());

    try
    {
        $Page = new presenzePage("presenze.php", "presenze", GetCurrentUserGrantForDataSource("presenze"), 'UTF-8');
        $Page->SetShortCaption('Presenze');
        $Page->SetHeader(GetPagesHeader());
        $Page->SetFooter(GetPagesFooter());
        $Page->SetCaption('Presenze');
        $Page->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource("presenze"));

        GetApplication()->SetMainPage($Page);
        GetApplication()->Run();
    }
    catch(Exception $e)
    {
        ShowErrorPage($e->getMessage());
    }

?>
